package x.zero.mapper;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Sql;
import x.zero.pojo.entity.*;

import java.util.List;

/*
*
* gen by beetlsql3 mapper 2021-01-15
*/
public interface SysRoleMapper extends BaseMapper<SysRole> {
    /**
     * 获取用于所有角色
     */
    @Sql(value = "select r.*\n" +
            "        from sys_user_role ar left join sys_role r on ar.role_id = r.id\n" +
            "        where ar.admin_id = ?")
    List<SysRole> getRoleListByUserId(Long adminId);
}
